---
title: "Reputation penalty - study 2"
author: "Jacob Ausubel, Annika Davies, and Ethan Porter"
date: "2025-08-28"
output:
  pdf_document:
    extra_dependencies: float
  word_document: default
  html_document:
    df_print: paged
fontsize: 12pt
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Study 2

Note that we ran two waves for Study 2. We're publicly sharing a dataset in which the two wave datasets have already been merged together and personally identifying information has been removed.

```{r, include = FALSE, message = FALSE}
#Clear global environment
rm(list = ls())
```

```{r, include = FALSE, message = FALSE}
#Loading various packages
library(readr)
library(lmtest)
library(sandwich)
library(margins)
library(texreg)
library(haven)
library(MASS)
library(dplyr)
library(ggplot2)
library(ggrepel)
library(marginaleffects)
library(estimatr)
library(imputeTS)
library(fabricatr)
library(tidyr)
library(tidyverse)
library(lubridate)
library(qualtRics)
library(naniar)
library(RCT)
library(texreg)
library(huxtable)
library(stargazer)
library(ggpubr)
library(vtable)
library(cobalt)
library(kableExtra)
library(xtable)
library(ggthemes)
library(stats)
library(biostat3)
library(pwr)
```

```{r, include = FALSE, message = FALSE}
#Reading in wave 1 dataset; not including first two rows, since those are giving descriptions of
  #the variables
#abortion_wave1_s2_private <- read_csv("January 2024 Screener_February 27, 2024_20.40.csv")
#abortion_wave1_s2_public <- abortion_wave1_s2_private[-c(1,2),]

#Dropping some variables that won't be included in the public dataset
#Note that I'll drop participantId once I've merged wave 1 with wave 2 for Study 2
#abortion_wave1_s2_public <-
#  abortion_wave1_s2_public %>%
#  select(-c(Status, IPAddress, ResponseId, RecipientLastName, RecipientFirstName, 
#         RecipientEmail, ExternalReference, LocationLatitude, LocationLongitude, 
#         DistributionChannel, Q1, ac1, ac2, state, Q45, assignmentId, projectId))
```

```{r, include = FALSE, message = FALSE}
#Recoding variable names so that they end with _w1
#colnames(abortion_wave1_s2_public) <-
#  paste0(colnames(abortion_wave1_s2_public), "_w1")

#However, I want one column to be participantId, NOT participantId_w1
#That way, I can merge the wave 1 and wave 2 datasets together
#colnames(abortion_wave1_s2_public)[
#  colnames(abortion_wave1_s2_public) == "participantId_w1"] <- "participantId"
```

```{r, include = FALSE, message = FALSE}
#Reading in wave 2 dataset
#abortion_wave2_s2_private <- read_csv("Abortion Study 2 EP version_February 27, 2024_20.26.csv")
```

```{r, include = FALSE, message = FALSE}
#Subsetting to actual survey respondents and people who consented to take
  #the survey
#abortion_wave2_s2_public <-
#  subset(abortion_wave2_s2_private, Status == "IP Address" & Q1...18 == "Yes")

#Dropping some variables that won't be included in the public dataset
#Note that I'll drop participantId once I've merged wave 1 with wave 2 for Study 2
#abortion_wave2_s2_public <-
#  abortion_wave2_s2_public %>%
#  select(-c(Status, IPAddress, ResponseId, RecipientLastName, RecipientFirstName, 
#            RecipientEmail, ExternalReference, LocationLatitude, LocationLongitude, 
#            DistributionChannel, Q1...18, Q2_Browser, Q2_Version, `Q2_Operating System`, 
#            Q2_Resolution, assignmentId, projectId))
```

```{r, include = FALSE, message = FALSE}
#Recoding variable names so that they end with _w2
#colnames(abortion_wave2_s2_public) <-
#  paste0(colnames(abortion_wave2_s2_public), "_w2")

#However, I want one column to be participantId, NOT participantId_w2
#That way, I can merge the wave 1 and wave 2 datasets together
#colnames(abortion_wave2_s2_public)[
#  colnames(abortion_wave2_s2_public) == "participantId_w2"] <- "participantId"
```

```{r, include = FALSE, message = FALSE}
#Merging together wave 1 and wave 2
#Only people kept: people in which there is a common participant ID
  #in both waves
#both_waves_s2 <-
#  merge(abortion_wave1_s2_public, abortion_wave2_s2_public, by = c("participantId"))

#Dropping participantId variable
#both_waves_s2 <-
#  both_waves_s2 %>%
#  select(-participantId)
```

```{r, include = FALSE, message = FALSE}
#Creating public CSV file
#write.csv(both_waves_s2, "both_wave_s2 - PUBLIC.csv", row.names = FALSE)
```

```{r, include = FALSE, message = FALSE}
#Reading in public dataset that includes both waves of Study 2
both_waves_s2 <- read_csv("both_wave_s2 - PUBLIC.csv")
```

```{r, include = FALSE, message = FALSE}
#Creating cleaned PID variable (screener/wave 1)
#1 (Strong Democrat) to 7 (Strong Republican)
both_waves_s2$pid_cleaned <- NA
both_waves_s2$pid_cleaned[
  both_waves_s2$pid_dem_w1 == "Strong Democrat"
  ] <- 1
both_waves_s2$pid_cleaned[
  both_waves_s2$pid_dem_w1 == "Not very strong Democrat"
  ] <- 2
both_waves_s2$pid_cleaned[
  both_waves_s2$pid_indep_w1 == "Closer to the Democratic Party"
  ] <- 3
both_waves_s2$pid_cleaned[
  both_waves_s2$pid_indep_w1 == "Neither"
  ] <- 4
both_waves_s2$pid_cleaned[
  both_waves_s2$pid_indep_w1 == "Closer to the Republican Party"
  ] <- 5
both_waves_s2$pid_cleaned[
  both_waves_s2$pid_rep_w1 == "Not very strong Republican"
  ] <- 6
both_waves_s2$pid_cleaned[
  both_waves_s2$pid_rep_w1 == "Strong Republican"
  ] <- 7
```

```{r, include = FALSE, message = FALSE}
#Creating male dummy variable
both_waves_s2$male <- ifelse(both_waves_s2$gender_w1 == "Man", 1, 0)
```

```{r, include = FALSE, message = FALSE}
#Creating a dummy variable for whether someone has a Bachelor's
  #degree or above
both_waves_s2$college_grad <-
  ifelse(both_waves_s2$educ_w1 %in% 
    c("Bachelor's degree", "Master's degree", "Professional or doctorate degree"), 
    1, 0)
```

```{r, include = FALSE, message = FALSE}
#Household income at $100,000+
both_waves_s2$income_100000 <-
  ifelse(both_waves_s2$income_w1 %in%
    c("$100,000 to less than $200,000", "$200,000 to less than $250,000", 
    "Greater than $250,000"),
    1, 0)
```

```{r, include = FALSE, message = FALSE}
#Cleaning birth year variable
both_waves_s2$birthyear_w1 <-
  as.numeric(both_waves_s2$birthyear_w1)
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 199
  ] <- NA
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 66
  ] <- 2024-66
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 29
  ] <- 2024-29
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 32
  ] <- 2024-32
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 38
  ] <- 2024-38
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 34
  ] <- 2024-34
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 25
  ] <- 2024-25
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 43
  ] <- 2024-43
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 42
  ] <- 2024-42
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 11992
  ] <- 1992
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 19971
  ] <- 1971
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 1193
  ] <- 1993
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 33
  ] <- 2024-33
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 45
  ] <- 2024-45
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 28390
  ] <- NA
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 30
  ] <- 2024-30
both_waves_s2$birthyear_w1[
  both_waves_s2$birthyear_w1 == 2990
  ] <- 1990
```

```{r, include = FALSE, message = FALSE}
#Creating age variable
both_waves_s2$age <-
  2024-both_waves_s2$birthyear_w1
```

```{r, include = FALSE, message = FALSE}
#Creating a dummy variable for whether someone is
  #affiliated with a religion
both_waves_s2$relig_affiliated <-
  ifelse(
    both_waves_s2$religion_w1 %in% c("Buddhist", "Jewish", "Mormon", "Muslim", 
    "Orthodox, such as Greek or Russian Orthodox", "Protestant",
    "Roman Catholic", "Something else"), 1, 0
  )
```

```{r, include = FALSE, message = FALSE}
#Creating a dummy variable for whether someone attends
  #religious services at least once a month
both_waves_s2$monthly_attend <-
  ifelse(
    both_waves_s2$religiosity_w1 %in% c("More than once a week",
    "Once a week", "Once or twice a month"), 1, 0
  )
```

```{r, include = FALSE, message = FALSE}
#Creating a dummy variable for whether someone is
  #non-Hispanic White
both_waves_s2$non_hisp_white <-
  ifelse(
    both_waves_s2$race_w1 == "White" & both_waves_s2$hispanic_w1 == "No",
    1, 0
  )
```

```{r, include = FALSE, message = FALSE}
#Recoding first factual belief (screener)
both_waves_s2$fc_1_belief_screener <- NA
both_waves_s2$fc_1_belief_screener[
  both_waves_s2$fc_1_belief_w1 == "Very accurate"
  ] <- 4
both_waves_s2$fc_1_belief_screener[
  both_waves_s2$fc_1_belief_w1 == "Somewhat accurate"
  ] <- 3
both_waves_s2$fc_1_belief_screener[
  both_waves_s2$fc_1_belief_w1 == "Not very accurate"
  ] <- 2
both_waves_s2$fc_1_belief_screener[
  both_waves_s2$fc_1_belief_w1 == "Not at all accurate"
  ] <- 1
```

```{r message=FALSE, include=FALSE}
#Recoding second factual belief (screener)
both_waves_s2$fc_2_belief_screener <- NA
both_waves_s2$fc_2_belief_screener[
  both_waves_s2$fc_2_belief_w1 == "Very accurate"
  ] <- 4
both_waves_s2$fc_2_belief_screener[
  both_waves_s2$fc_2_belief_w1 == "Somewhat accurate"
  ] <- 3
both_waves_s2$fc_2_belief_screener[
  both_waves_s2$fc_2_belief_w1 == "Not very accurate"
  ] <- 2
both_waves_s2$fc_2_belief_screener[
  both_waves_s2$fc_2_belief_w1 == "Not at all accurate"
  ] <- 1
```

```{r, include = FALSE, message = FALSE}
#Recoding third factual belief (screener)
both_waves_s2$fc_3_belief_screener <- NA
both_waves_s2$fc_3_belief_screener[
  both_waves_s2$fc_3_belief_w1 == "Very accurate"
  ] <- 4
both_waves_s2$fc_3_belief_screener[
  both_waves_s2$fc_3_belief_w1 == "Somewhat accurate"
  ] <- 3
both_waves_s2$fc_3_belief_screener[
  both_waves_s2$fc_3_belief_w1 == "Not very accurate"
  ] <- 2
both_waves_s2$fc_3_belief_screener[
  both_waves_s2$fc_3_belief_w1 == "Not at all accurate"
  ] <- 1
```

```{r, include = FALSE, message = FALSE}
#Recoding abortion laws measure (screener)
both_waves_s2$abortion_laws_screener <- NA
both_waves_s2$abortion_laws_screener[
  both_waves_s2$abortion_laws_w1 == "By law, abortion should never be permitted."
  ] <- 1
both_waves_s2$abortion_laws_screener[
  both_waves_s2$abortion_laws_w1 == "The law should permit abortion only in case of rape, incest or when the woman's life is in danger."
  ] <- 2
both_waves_s2$abortion_laws_screener[
  both_waves_s2$abortion_laws_w1 == "The law should permit abortion for reasons other than rape, incest, or danger to the woman's life, but only after the need has been clearly established."
  ] <- 3
both_waves_s2$abortion_laws_screener[
  both_waves_s2$abortion_laws_w1 == "By law, a woman should always be able to obtain an abortion as a matter of personal choice."
  ] <- 4
```

```{r, include = FALSE, message = FALSE}
#Recoding abortion penalties measure (screener)
both_waves_s2$abortion_penalties_1_cleaned <- NA
both_waves_s2$abortion_penalties_1_cleaned[
  both_waves_s2$abortion_penalties_1_w1 == "Should face penalties"
  ] <- 1
both_waves_s2$abortion_penalties_1_cleaned[
  both_waves_s2$abortion_penalties_1_w1 == "Should not face penalties"
  ] <- 0

both_waves_s2$abortion_penalties_2_cleaned <- NA
both_waves_s2$abortion_penalties_2_cleaned[
  both_waves_s2$abortion_penalties_2_w1 == "Should face penalties"
  ] <- 1
both_waves_s2$abortion_penalties_2_cleaned[
  both_waves_s2$abortion_penalties_2_w1 == "Should not face penalties"
  ] <- 0

both_waves_s2$abortion_penalties_3_cleaned <- NA
both_waves_s2$abortion_penalties_3_cleaned[
  both_waves_s2$abortion_penalties_3_w1 == "Should face penalties"
  ] <- 1
both_waves_s2$abortion_penalties_3_cleaned[
  both_waves_s2$abortion_penalties_3_w1 == "Should not face penalties"
  ] <- 0

both_waves_s2$abortion_penalties_4_cleaned <- NA
both_waves_s2$abortion_penalties_4_cleaned[
  both_waves_s2$abortion_penalties_4_w1 == "Should face penalties"
  ] <- 1
both_waves_s2$abortion_penalties_4_cleaned[
  both_waves_s2$abortion_penalties_4_w1 == "Should not face penalties"
  ] <- 0

both_waves_s2$abortion_penalties_screener <-
  both_waves_s2$abortion_penalties_1_cleaned + 
  both_waves_s2$abortion_penalties_2_cleaned +
  both_waves_s2$abortion_penalties_3_cleaned +
  both_waves_s2$abortion_penalties_4_cleaned 
```

```{r, include = FALSE, message = FALSE}
#Making feeling thermometer variables (from W1/screener) numeric

#Alliance Defending Freedom (screener)
both_waves_s2$alliance_defending_freedom_screener <-
  as.numeric(both_waves_s2$thermometer_1_w1)
#Seth Gruber (screener)
both_waves_s2$gruber_screener <-
  as.numeric(both_waves_s2$thermometer_2_w1)
#Americans United For Life (screener)
both_waves_s2$americans_united_screener <-
  as.numeric(both_waves_s2$thermometer_3_w1)
#Eric Swalwell (screener)
both_waves_s2$swalwell_screener <-
  as.numeric(both_waves_s2$thermometer_5_w1)
#PolitiFact (screener)
both_waves_s2$politifact_screener <-
  as.numeric(both_waves_s2$thermometer_6_w1)
#Planned Parenthood (screener)
both_waves_s2$planned_parenthood_screener <-
  as.numeric(both_waves_s2$thermometer_7_w1)
```

## List of variables

### Main variables

**Factual belief 1**: Belief that abortion pills are dangerous and that 1 in 5 women will suffer a complication (1-to-4 scale)

**Factual belief 2**: Belief that more contraception availability increases abortion demand (1-to-4 scale)

**Factual belief 3**: Belief that if a 10-year-old became pregnant as a result of rape and terminated the pregnancy because it was threatening her life, then that’s not an abortion (1-to-4 scale)

**Various feeling thermometers** (0-to-100 scale)

**Abortion laws measure** (1-to-4 scale)

**Abortion penalties measure** (0-to-4 scale)

### Some control variables

**Partisanship**: 1 (Strong Democrat) to 7 (Strong Republican) scale

**Male**: 1 = Yes, 0 = No

**College graduate**: 1 = Yes, 0 = No

**High household income**: 1 = household income of $100,000+, 0 = below that

**Age**: 18+

**Religiously affiliated**: 1 = Yes, 0 = No

**Attends religious services at least once a month**: 1 = Yes, 0 = No

**Non-Hispanic White**: 1 = Yes, 0 = No


```{r, include = FALSE, message = FALSE}
#Recoding first factual belief (wave 2)
#Belief that abortion pills are dangerous and that 1 in 5 women will suffer a complication
both_waves_s2$fc_1_belief <- NA
both_waves_s2$fc_1_belief[
  both_waves_s2$Q1...31_w2 == "Very accurate"
  ] <- 4
both_waves_s2$fc_1_belief[
  both_waves_s2$Q1...31_w2 == "Somewhat accurate"
  ] <- 3
both_waves_s2$fc_1_belief[
  both_waves_s2$Q1...31_w2 == "Not very accurate"
  ] <- 2
both_waves_s2$fc_1_belief[
  both_waves_s2$Q1...31_w2 == "Not at all accurate"
  ] <- 1
```

```{r, include = FALSE, message = FALSE}
#Making feeling thermometers (FC1, wave 2) numeric

#Alliance Defending Freedom
both_waves_s2$therm_1_fc1 <-
  as.numeric(both_waves_s2$Q1_1...32_w2)
#iPhone
both_waves_s2$therm_2_fc1 <-
  as.numeric(both_waves_s2$Q1_2...33_w2)
#McDonald's
both_waves_s2$therm_3_fc1 <-
  as.numeric(both_waves_s2$Q1_3...34_w2)
#PolitiFact
both_waves_s2$therm_4_fc1 <-
  as.numeric(both_waves_s2$Q1_4...35_w2)
#Planned Parenthood
both_waves_s2$therm_5_fc1 <-
  as.numeric(both_waves_s2$Q1_5...36_w2)
```

```{r, include = FALSE, message = FALSE}
#Setting misinformation group as reference category (for FC1, wave 2)
both_waves_s2$fc1_w2 <- 
  as.factor(both_waves_s2$fc1_w2)
both_waves_s2$fc1_w2 <- 
  relevel(both_waves_s2$fc1_w2, ref="mis")
```

```{r, include = FALSE, message = FALSE}
#Recoding second factual belief (wave 2)
#Belief that more contraception availability increases abortion demand
both_waves_s2$fc_2_belief <- NA
both_waves_s2$fc_2_belief[
  both_waves_s2$Q1...53_w2 == "Very accurate"
  ] <- 4
both_waves_s2$fc_2_belief[
  both_waves_s2$Q1...53_w2 == "Somewhat accurate"
  ] <- 3
both_waves_s2$fc_2_belief[
  both_waves_s2$Q1...53_w2 == "Not very accurate"
  ] <- 2
both_waves_s2$fc_2_belief[
  both_waves_s2$Q1...53_w2 == "Not at all accurate"
  ] <- 1
```

```{r, include = FALSE, message = FALSE}
#Making feeling thermometers (FC2, wave 2) numeric

#Seth Gruber
both_waves_s2$therm_1_fc2 <-
  as.numeric(both_waves_s2$Q1_1...54_w2)
#iPhone
both_waves_s2$therm_2_fc2 <-
  as.numeric(both_waves_s2$Q1_2...55_w2)
#McDonald's
both_waves_s2$therm_3_fc2 <-
  as.numeric(both_waves_s2$Q1_3...56_w2)
#PolitiFact
both_waves_s2$therm_4_fc2 <-
  as.numeric(both_waves_s2$Q1_4...57_w2)
#Planned Parenthood
both_waves_s2$therm_5_fc2 <-
  as.numeric(both_waves_s2$Q1_5...58_w2)
```

```{r, include = FALSE, message = FALSE}
#Setting misinformation group as reference category (for FC2, wave 2)
both_waves_s2$fc2_w2 <- 
  as.factor(both_waves_s2$fc2_w2)
both_waves_s2$fc2_w2 <- 
  relevel(both_waves_s2$fc2_w2, ref="mis")
```

```{r, include = FALSE, message = FALSE}
#Recoding third factual belief (wave 2)
#Belief that if a 10-year-old became pregnant as a result of rape and terminated the pregnancy 
  #because it was threatening her life, then that's not an abortion
both_waves_s2$fc_3_belief <- NA
both_waves_s2$fc_3_belief[
  both_waves_s2$Q1...75_w2 == "Very accurate"
  ] <- 4
both_waves_s2$fc_3_belief[
  both_waves_s2$Q1...75_w2 == "Somewhat accurate"
  ] <- 3
both_waves_s2$fc_3_belief[
  both_waves_s2$Q1...75_w2 == "Not very accurate"
  ] <- 2
both_waves_s2$fc_3_belief[
  both_waves_s2$Q1...75_w2 == "Not at all accurate"
  ] <- 1
```


```{r, include = FALSE, message = FALSE}
#Making feeling thermometers (FC3, wave 2) numeric

#Americans United For Life
both_waves_s2$therm_1_fc3 <-
  as.numeric(both_waves_s2$Q1_1...76_w2)
#Eric Swalwell
both_waves_s2$therm_2_fc3 <-
  as.numeric(both_waves_s2$Q1_2...77_w2)
#iPhone
both_waves_s2$therm_3_fc3 <-
  as.numeric(both_waves_s2$Q1_3...78_w2)
#McDonald's
both_waves_s2$therm_4_fc3 <-
  as.numeric(both_waves_s2$Q1_4...79_w2)
#PolitiFact
both_waves_s2$therm_5_fc3 <-
  as.numeric(both_waves_s2$Q1_5...80_w2)
#Planned Parenthood
both_waves_s2$therm_6_fc3 <-
  as.numeric(both_waves_s2$Q1_6_w2)
```

```{r, include = FALSE, message = FALSE}
#Setting misinformation group as reference category (for FC3, wave 2)
both_waves_s2$fc3_w2 <- 
  as.factor(both_waves_s2$fc3_w2)
both_waves_s2$fc3_w2 <- 
  relevel(both_waves_s2$fc3_w2, ref="mis")
```

## Factual belief models

### Main models

```{r, include = FALSE, message = FALSE}
#First factual belief
#Running model
fit1_s2 <- lm_robust(fc_1_belief ~ fc1_w2 + fc_1_belief_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit1_s2, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment factual belief", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check on the belief that abortion pills are dangerous and that 1 in 5 women will suffer a complication (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_1_belief_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```
```{r, include = FALSE, message = FALSE}
#Second factual belief
#Running model
fit2_s2 <- lm_robust(fc_2_belief ~ fc2_w2 + fc_2_belief_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit2_s2, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment factual belief", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check on the belief that more contraception availability increases abortion demand (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_2_belief_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```
```{r, include = FALSE, message = FALSE}
#Third factual belief
#Running model
fit3_s2 <- lm_robust(fc_3_belief ~ fc3_w2 + fc_3_belief_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit3_s2, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment factual belief", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check on the belief about the pregnant 10-year-old (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_3_belief_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```
### Does receptivity to fact-checks (that is, the correction - misinformation contrast) differ by Party ID?

```{r, include = FALSE, message = FALSE}
#Recoding partisanship variable
both_waves_s2$pid_alternative <- both_waves_s2$pid_1_w1
both_waves_s2$pid_alternative[
  both_waves_s2$pid_1_w1 == "Independent"
  ] <- "Independent/Other"
both_waves_s2$pid_alternative[
  both_waves_s2$pid_1_w1 == "Other"
  ] <- "Independent/Other"
```

```{r, include = FALSE, message = FALSE}
#First factual belief
#Running model
rq1a_s2 <- lm_robust(fc_1_belief ~ fc1_w2*pid_alternative + fc_1_belief_screener +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, include = FALSE, message = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
rq1a_s2_v2 <- texreg(rq1a_s2, include.ci = FALSE,
       custom.coef.names = 
         c("Intercept", "Control", "Fact-check",
           "Independent/Other", "Republican",
           "Pre-treatment factual belief", 
          "Male", "College graduate", 
          "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White",
           "Control*Independent/Other",
           "Fact-check*Independent/Other",
           "Control*Republican",
           "Fact-check*Republican"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between being a Republican/Independent (vs. being a Democrat) and fact-check of belief that abortion pills are dangerous (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_1_belief_screener|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
rq1a_s2_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', rq1a_s2_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
rq1a_s2_effects <- avg_comparisons(rq1a_s2, variables = "fc1_w2", by = "pid_alternative")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
rq1a_s2_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  coef = c(as.numeric(rq1a_s2$coefficients[1]), rq1a_s2_effects$estimate),
  se = c(as.numeric(rq1a_s2$std.error[1]), rq1a_s2_effects$std.error),
  pvalues = c(as.numeric(rq1a_s2$p.value[1]), rq1a_s2_effects$p.value),
  gof = c(as.numeric(summary(rq1a_s2)[9]), 
          as.numeric(summary(rq1a_s2)[10]), 
          as.integer(summary(rq1a_s2)[13]), 
          rq1a_s2_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(rq1a_s2_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  caption = "Effect of fact-check on the belief that abortion pills are dangerous and that 1 in 5 women
will suffer a complication (1-to-4 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, message = FALSE}
#Second factual belief
#Running model
rq1b_s2 <- lm_robust(fc_2_belief ~ fc2_w2*pid_alternative + fc_2_belief_screener +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, include = FALSE, message = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
rq1b_s2_v2 <- texreg(rq1b_s2, include.ci = FALSE,
       custom.coef.names = 
         c("Intercept", "Control", "Fact-check",
           "Independent/Other", "Republican",
           "Pre-treatment factual belief", 
          "Male", "College graduate", 
          "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White",
           "Control*Independent/Other",
           "Fact-check*Independent/Other",
           "Control*Republican",
           "Fact-check*Republican"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between being a Republican/Independent (vs. being a Democrat) and fact-check of the belief that more contraception availability increases abortion demand (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_2_belief_screener|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
rq1b_s2_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', rq1b_s2_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
rq1b_s2_effects <- avg_comparisons(rq1b_s2, variables = "fc2_w2", by = "pid_alternative")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
rq1b_s2_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  coef = c(as.numeric(rq1b_s2$coefficients[1]), rq1b_s2_effects$estimate),
  se = c(as.numeric(rq1b_s2$std.error[1]), rq1b_s2_effects$std.error),
  pvalues = c(as.numeric(rq1b_s2$p.value[1]), rq1b_s2_effects$p.value),
  gof = c(as.numeric(summary(rq1b_s2)[9]), 
          as.numeric(summary(rq1b_s2)[10]), 
          as.integer(summary(rq1b_s2)[13]), 
          rq1b_s2_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(rq1b_s2_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  caption = "Effect of fact-check on the belief that more contraception availability increases abortion
demand (1-to-4 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, message = FALSE}
#Third factual belief
#Running model
rq1c_s2 <- lm_robust(fc_3_belief ~ fc3_w2*pid_alternative + fc_3_belief_screener +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, include = FALSE, message = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
rq1c_s2_v2 <- texreg(rq1c_s2, include.ci = FALSE,
       custom.coef.names = 
         c("Intercept", "Control", "Fact-check",
           "Independent/Other", "Republican",
          "Pre-treatment factual belief", 
          "Male", "College graduate", 
          "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White",
           "Control*Independent/Other",
           "Fact-check*Independent/Other",
           "Control*Republican",
           "Fact-check*Republican"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between being a Republican/Independent (vs. being a Democrat) and fact-check of the belief about the pregnant 10-year-old (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_3_belief_screener|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
rq1c_s2_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', rq1c_s2_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
rq1c_s2_effects <- avg_comparisons(rq1c_s2, variables = "fc3_w2", by = "pid_alternative")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
rq1c_s2_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  coef = c(as.numeric(rq1c_s2$coefficients[1]), rq1c_s2_effects$estimate),
  se = c(as.numeric(rq1c_s2$std.error[1]), rq1c_s2_effects$std.error),
  pvalues = c(as.numeric(rq1c_s2$p.value[1]), rq1c_s2_effects$p.value),
  gof = c(as.numeric(summary(rq1c_s2)[9]), 
          as.numeric(summary(rq1c_s2)[10]), 
          as.integer(summary(rq1c_s2)[13]), 
          rq1c_s2_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(rq1c_s2_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  caption = "Effect of fact-check on the belief that it’s not an abortion if a 10-year-old became
pregnant as a result of rape and terminated the pregnancy (1-to-4 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

### Does receptivity to fact-checks (that is, the correction - misinformation contrast) differ by religiosity?

```{r, include = FALSE, message = FALSE}
#Creating new religiosity variable
both_waves_s2$attend_cleaned <- "Low"
both_waves_s2$attend_cleaned[
  both_waves_s2$religiosity_w1 == "A few times a year"
  ] <- "Medium"
both_waves_s2$attend_cleaned[
  both_waves_s2$religiosity_w1 == "Once or twice a month"
  ] <- "Medium"
both_waves_s2$attend_cleaned[
  both_waves_s2$religiosity_w1 == "Once a week"
  ] <- "High"
both_waves_s2$attend_cleaned[
  both_waves_s2$religiosity_w1 == "More than once a week"
  ] <- "High"
both_waves_s2$attend_cleaned <-
  as.factor(both_waves_s2$attend_cleaned)
both_waves_s2$attend_cleaned <- 
  relevel(both_waves_s2$attend_cleaned, ref="Medium")
```

```{r, include = FALSE, message = FALSE}
#First factual belief
#Running model
rq2a_s2 <- lm_robust(fc_1_belief ~ fc1_w2*attend_cleaned + fc_1_belief_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        non_hisp_white, data = both_waves_s2)
```

```{r, include = FALSE, message = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
rq2a_s2_v2 <- texreg(rq2a_s2, include.ci = FALSE,
       custom.coef.names = 
         c("Intercept", "Control", "Fact-check",
           "High attendance", "Low attendance",
          "Pre-treatment factual belief", 
          "Partisanship", "Male", "College graduate", "High household income", "Age",
          "Non-Hispanic White",
           "Control*High attendance",
           "Fact-check*High attendance",
           "Control*Low attendance",
           "Fact-check*Low attendance"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between high/low (vs. medium) religious attendance and fact-check of belief that abortion pills are dangerous (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_1_belief_screener|pid_cleaned|male|college_grad|income_100000|age|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
rq2a_s2_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', rq2a_s2_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
rq2a_s2_effects <- avg_comparisons(rq2a_s2, variables = "fc1_w2", by = "attend_cleaned")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
rq2a_s2_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Medium attendance)", "Control (High attendance)", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  coef = c(as.numeric(rq2a_s2$coefficients[1]), rq2a_s2_effects$estimate),
  se = c(as.numeric(rq2a_s2$std.error[1]), rq2a_s2_effects$std.error),
  pvalues = c(as.numeric(rq2a_s2$p.value[1]), rq2a_s2_effects$p.value),
  gof = c(as.numeric(summary(rq2a_s2)[9]), 
          as.numeric(summary(rq2a_s2)[10]), 
          as.integer(summary(rq2a_s2)[13]), 
          rq2a_s2_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(rq2a_s2_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Medium attendance)", "Control (High attendance)", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  caption = "Effect of fact-check on the belief that abortion pills are dangerous and that 1 in 5 women
will suffer a complication (1-to-4 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, message = FALSE}
#Second factual belief
#Running model
rq2b_s2 <- lm_robust(fc_2_belief ~ fc2_w2*attend_cleaned + fc_2_belief_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        non_hisp_white, data = both_waves_s2)
```

```{r, include = FALSE, message = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
rq2b_s2_v2 <- texreg(rq2b_s2, include.ci = FALSE,
       custom.coef.names = 
         c("Intercept", "Control", "Fact-check",
           "High attendance", "Low attendance",
           "Pre-treatment factual belief", 
          "Partisanship", "Male", "College graduate", "High household income", "Age",
          "Non-Hispanic White",
           "Control*High attendance",
           "Fact-check*High attendance",
           "Control*Low attendance",
           "Fact-check*Low attendance"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between high/low (vs. medium) religious attendance and fact-check of the belief that more contraception availability increases abortion demand (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_2_belief_screener|pid_cleaned|male|college_grad|income_100000|age|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
rq2b_s2_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', rq2b_s2_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
rq2b_s2_effects <- avg_comparisons(rq2b_s2, variables = "fc2_w2", by = "attend_cleaned")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
rq2b_s2_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Medium attendance)", "Control (High attendance)", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  coef = c(as.numeric(rq2b_s2$coefficients[1]), rq2b_s2_effects$estimate),
  se = c(as.numeric(rq2b_s2$std.error[1]), rq2b_s2_effects$std.error),
  pvalues = c(as.numeric(rq2b_s2$p.value[1]), rq2b_s2_effects$p.value),
  gof = c(as.numeric(summary(rq2b_s2)[9]), 
          as.numeric(summary(rq2b_s2)[10]), 
          as.integer(summary(rq2b_s2)[13]), 
          rq2b_s2_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(rq2b_s2_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Medium attendance)", "Control (High attendance)", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  caption = "Effect of fact-check on the belief that more contraception availability increases abortion demand (1-to-4 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, message = FALSE}
#Third factual belief
#Running model
rq2c_s2 <- lm_robust(fc_3_belief ~ fc3_w2*attend_cleaned + fc_3_belief_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        non_hisp_white, data = both_waves_s2)
```

```{r, include = FALSE, message = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
rq2c_s2_v2 <- texreg(rq2c_s2, include.ci = FALSE,
       custom.coef.names = 
         c("Intercept", "Control", "Fact-check",
           "High attendance", "Low attendance",
           "Pre-treatment factual belief", 
          "Partisanship", "Male", "College graduate", "High household income", "Age",
          "Non-Hispanic White",
           "Control*High attendance",
           "Fact-check*High attendance",
           "Control*Low attendance",
           "Fact-check*Low attendance"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between high/low (vs. medium) religious attendance and fact-check of the belief about the pregnant 10-year-old (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "fc_3_belief_screener|pid_cleaned|male|college_grad|income_100000|age|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
rq2c_s2_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', rq2c_s2_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
rq2c_s2_effects <- avg_comparisons(rq2c_s2, variables = "fc3_w2", by = "attend_cleaned")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
rq2c_s2_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Medium attendance)", "Control (High attendance)", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  coef = c(as.numeric(rq2c_s2$coefficients[1]), rq2c_s2_effects$estimate),
  se = c(as.numeric(rq2c_s2$std.error[1]), rq2c_s2_effects$std.error),
  pvalues = c(as.numeric(rq2c_s2$p.value[1]), rq2c_s2_effects$p.value),
  gof = c(as.numeric(summary(rq2c_s2)[9]), 
          as.numeric(summary(rq2c_s2)[10]), 
          as.integer(summary(rq2c_s2)[13]), 
          rq2c_s2_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(rq2c_s2_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Medium attendance)", "Control (High attendance)", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  caption = "Effect of fact-check on the belief that it’s not an abortion if a 10-year-old became pregnant as a result of rape and terminated the pregnancy (1-to-4 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

## Attitudinal belief models

### Main models

```{r, include = FALSE, message = FALSE}
#Alliance Defending Freedom
#Running model
fit4_s2 <- lm_robust(therm_1_fc1 ~ fc1_w2 + alliance_defending_freedom_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit4_s2, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment feeling thermometer", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check about abortion pills on ratings of Alliance Defending Freedom (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "alliance_defending_freedom_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, message = FALSE}
#Seth Gruber
#Running model
fit5_s2 <- lm_robust(therm_1_fc2 ~ fc2_w2 + gruber_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit5_s2, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment feeling thermometer", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check about contraception availability on ratings of Seth Gruber (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "gruber_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, message = FALSE}
#Americans United For Life
#Running model
fit6_s2 <- lm_robust(therm_1_fc3 ~ fc3_w2 + americans_united_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit6_s2, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment feeling thermometer", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check about pregnant 10-year-old on ratings of Americans United For Life (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "americans_united_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

### Interactions with partisanship

```{r, include = FALSE, warning = FALSE}
#Creating model
fit7_s2_partisanship <- lm_robust(therm_1_fc1 ~ fc1_w2*pid_alternative + 
        alliance_defending_freedom_screener +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, 
        data = both_waves_s2)
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
fit7_s2_partisanship_v2 <- texreg(fit7_s2_partisanship, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check",
          "Independent/Other", "Republican",
          "Pre-treatment feeling thermometer", 
          "Male", "College graduate", 
          "High household income", "Age", "Religiously affiliated", 
          "Monthly attendance", "Non-Hispanic White",
          "Control*Independent/Other",
          "Fact-check*Independent/Other",
          "Control*Republican",
          "Fact-check*Republican"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between being a Republican/Independent (vs. being a Democrat) and fact-check of the claim that abortion pills are dangerous on attitudes toward Alliance Defending Freedom (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
omit.coef = "alliance_defending_freedom_screener|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
fit7_s2_partisanship_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', fit7_s2_partisanship_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
fit7_s2_partisanship_effects <- avg_comparisons(fit7_s2_partisanship, variables = "fc1_w2", by = "pid_alternative")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
fit7_s2_partisanship_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  coef = c(as.numeric(fit7_s2_partisanship$coefficients[1]), fit7_s2_partisanship_effects$estimate),
  se = c(as.numeric(fit7_s2_partisanship$std.error[1]), fit7_s2_partisanship_effects$std.error),
  pvalues = c(as.numeric(fit7_s2_partisanship$p.value[1]), fit7_s2_partisanship_effects$p.value),
  gof = c(as.numeric(summary(fit7_s2_partisanship)[9]), 
          as.numeric(summary(fit7_s2_partisanship)[10]), 
          as.integer(summary(fit7_s2_partisanship)[13]), 
          fit7_s2_partisanship_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit7_s2_partisanship_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  caption = "Effect of fact-check about abortion pills on ratings of Alliance Defending Freedom (0-to-100 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, warning = FALSE}
#Running model
fit8_s2_partisanship <- lm_robust(therm_1_fc2 ~ fc2_w2*pid_alternative + 
        gruber_screener +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, 
        data = both_waves_s2)
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
fit8_s2_partisanship_v2 <- texreg(fit8_s2_partisanship, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check",
          "Independent/Other", "Republican",
          "Pre-treatment feeling thermometer", 
          "Male", "College graduate", 
          "High household income", "Age", "Religiously affiliated", 
          "Monthly attendance", "Non-Hispanic White",
          "Control*Independent/Other",
          "Fact-check*Independent/Other",
          "Control*Republican",
          "Fact-check*Republican"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between being a Republican/Independent (vs. being a Democrat) and fact-check of the claim that contraception availability increases abortion demand on attitudes toward Seth Gruber (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
omit.coef = "gruber_screener|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
fit8_s2_partisanship_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', fit8_s2_partisanship_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
fit8_s2_partisanship_effects <- avg_comparisons(fit8_s2_partisanship, variables = "fc2_w2", by = "pid_alternative")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
fit8_s2_partisanship_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  coef = c(as.numeric(fit8_s2_partisanship$coefficients[1]), fit8_s2_partisanship_effects$estimate),
  se = c(as.numeric(fit8_s2_partisanship$std.error[1]), fit8_s2_partisanship_effects$std.error),
  pvalues = c(as.numeric(fit8_s2_partisanship$p.value[1]), fit8_s2_partisanship_effects$p.value),
  gof = c(as.numeric(summary(fit8_s2_partisanship)[9]), 
          as.numeric(summary(fit8_s2_partisanship)[10]), 
          as.integer(summary(fit8_s2_partisanship)[13]), 
          fit8_s2_partisanship_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit8_s2_partisanship_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  caption = "Effect of fact-check about contraception availability on ratings of Seth Gruber (0-to-100 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, warning = FALSE}
#Running model
fit9_s2_partisanship <- lm_robust(therm_1_fc3 ~ fc3_w2*pid_alternative + 
        americans_united_screener +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, 
        data = both_waves_s2)
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
fit9_s2_partisanship_v2 <- texreg(fit9_s2_partisanship, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check",
          "Independent/Other", "Republican",
          "Pre-treatment feeling thermometer", 
          "Male", "College graduate", 
          "High household income", "Age", "Religiously affiliated", 
          "Monthly attendance", "Non-Hispanic White",
          "Control*Independent/Other",
          "Fact-check*Independent/Other",
          "Control*Republican",
          "Fact-check*Republican"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between being a Republican/Independent (vs. being a Democrat) and fact-check of claim about the pregnant 10-year-old on attitudes toward Americans United For Life (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
omit.coef = "americans_united_screener|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
fit9_s2_partisanship_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', fit9_s2_partisanship_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
fit9_s2_partisanship_effects <- avg_comparisons(fit9_s2_partisanship, variables = "fc3_w2", by = "pid_alternative")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
fit9_s2_partisanship_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  coef = c(as.numeric(fit9_s2_partisanship$coefficients[1]), fit9_s2_partisanship_effects$estimate),
  se = c(as.numeric(fit9_s2_partisanship$std.error[1]), fit9_s2_partisanship_effects$std.error),
  pvalues = c(as.numeric(fit9_s2_partisanship$p.value[1]), fit9_s2_partisanship_effects$p.value),
  gof = c(as.numeric(summary(fit9_s2_partisanship)[9]), 
          as.numeric(summary(fit9_s2_partisanship)[10]), 
          as.integer(summary(fit9_s2_partisanship)[13]), 
          fit9_s2_partisanship_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit9_s2_partisanship_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Democrats)", "Control (Independent/Other)", 
                 "Control (Republicans)", "Fact-check (Democrats)", 
                 "Fact-check (Independent/Other)", "Fact-check (Republicans)"),
  caption = "Effect of fact-check about pregnant 10-year-old on ratings of Americans United For Life (0-to-100 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

### Interactions with religiosity

```{r, include = FALSE, warning = FALSE}
#Running model
fit10_s2_religiosity <- lm_robust(therm_1_fc1 ~ fc1_w2*attend_cleaned + 
        alliance_defending_freedom_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        non_hisp_white, 
        data = both_waves_s2)
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
fit10_s2_religiosity_v2 <- texreg(fit10_s2_religiosity, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check",
          "High attendance", "Low attendance",                   
          "Pre-treatment feeling thermometer", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", 
          "Non-Hispanic White",
          "Control*High attendance",
          "Fact-check*High attendance",
          "Control*Low attendance",
          "Fact-check*Low attendance"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between high/low (vs. medium) religious attendance and fact-check of the claim that abortion pills are dangerous on attitudes toward Alliance Defending Freedom (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
omit.coef = "alliance_defending_freedom_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
fit10_s2_religiosity_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', fit10_s2_religiosity_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
fit10_s2_religiosity_effects <- avg_comparisons(fit10_s2_religiosity, variables = "fc1_w2", by = "attend_cleaned")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
fit10_s2_religiosity_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Medium attendance)", "Control (High attendance", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  coef = c(as.numeric(fit10_s2_religiosity$coefficients[1]), fit10_s2_religiosity_effects$estimate),
  se = c(as.numeric(fit10_s2_religiosity$std.error[1]), fit10_s2_religiosity_effects$std.error),
  pvalues = c(as.numeric(fit10_s2_religiosity$p.value[1]), fit10_s2_religiosity_effects$p.value),
  gof = c(as.numeric(summary(fit10_s2_religiosity)[9]), 
          as.numeric(summary(fit10_s2_religiosity)[10]), 
          as.integer(summary(fit10_s2_religiosity)[13]), 
          fit10_s2_religiosity_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit10_s2_religiosity_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Medium attendance)", "Control (High attendance", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  caption = "Effect of fact-check about abortion pills on ratings of Alliance Defending Freedom (0-to-100 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, warning = FALSE}
#Running model
fit11_s2_religiosity <- lm_robust(therm_1_fc2 ~ fc2_w2*attend_cleaned + 
        gruber_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        non_hisp_white, 
        data = both_waves_s2)
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
fit11_s2_religiosity_v2 <- texreg(fit11_s2_religiosity, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check",
          "High attendance", "Low attendance",                   
          "Pre-treatment feeling thermometer", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", 
          "Non-Hispanic White",
          "Control*High attendance",
          "Fact-check*High attendance",
          "Control*Low attendance",
          "Fact-check*Low attendance"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between high/low (vs. medium) religious attendance and fact-check of the belief that more contraception availability increases abortion demand on attitudes toward Seth Gruber (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
omit.coef = "gruber_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
fit11_s2_religiosity_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', fit11_s2_religiosity_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
fit11_s2_religiosity_effects <- avg_comparisons(fit11_s2_religiosity, variables = "fc2_w2", by = "attend_cleaned")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
fit11_s2_religiosity_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Medium attendance)", "Control (High attendance", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  coef = c(as.numeric(fit11_s2_religiosity$coefficients[1]), fit11_s2_religiosity_effects$estimate),
  se = c(as.numeric(fit11_s2_religiosity$std.error[1]), fit11_s2_religiosity_effects$std.error),
  pvalues = c(as.numeric(fit11_s2_religiosity$p.value[1]), fit11_s2_religiosity_effects$p.value),
  gof = c(as.numeric(summary(fit11_s2_religiosity)[9]), 
          as.numeric(summary(fit11_s2_religiosity)[10]), 
          as.integer(summary(fit11_s2_religiosity)[13]), 
          fit11_s2_religiosity_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit11_s2_religiosity_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Medium attendance)", "Control (High attendance", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  caption = "Effect of fact-check about contraception availability on ratings of Seth Gruber (0-to-100 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

```{r, include = FALSE, warning = FALSE}
#Running model
fit12_s2_religiosity <- lm_robust(therm_1_fc3 ~ fc3_w2*attend_cleaned + 
        americans_united_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        non_hisp_white, 
        data = both_waves_s2)
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object

#IMPORTANT: We originally showed results via interaction terms but switched 
  #to showing group-specific effects below for clarity.
#These are based on the SAME model.
fit12_s2_religiosity_v2 <- texreg(fit12_s2_religiosity, include.ci = FALSE,
       custom.coef.names = c("Intercept", "Control", "Fact-check",
          "High attendance", "Low attendance",                   
          "Pre-treatment feeling thermometer", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", 
          "Non-Hispanic White",
          "Control*High attendance",
          "Fact-check*High attendance",
          "Control*Low attendance",
          "Fact-check*Low attendance"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Interaction between high/low (vs. medium) religious attendance and fact-check of claim about the pregnant 10-year-old on attitudes toward Americans United For Life (0-to-100 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
omit.coef = "americans_united_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|non_hisp_white")
```

```{r, include = FALSE, warning = FALSE}
#Extracting RMSE value
fit12_s2_religiosity_rmse <- as.numeric(sub('.*RMSE\\s*&\\s*\\$([0-9\\.]+)\\$.*', '\\1', fit12_s2_religiosity_v2[1]))
```

```{r, include = FALSE, warning = FALSE}
#Getting effects of assignment conditions by partisanship
fit12_s2_religiosity_effects <- avg_comparisons(fit12_s2_religiosity, variables = "fc3_w2", by = "attend_cleaned")
```

```{r, include = FALSE, warning = FALSE}
#Creating texreg object
fit12_s2_religiosity_effects_v2 <- createTexreg(
  coef.names = c("Intercept", "Control (Medium attendance)", "Control (High attendance", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  coef = c(as.numeric(fit12_s2_religiosity$coefficients[1]), fit12_s2_religiosity_effects$estimate),
  se = c(as.numeric(fit12_s2_religiosity$std.error[1]), fit12_s2_religiosity_effects$std.error),
  pvalues = c(as.numeric(fit12_s2_religiosity$p.value[1]), fit12_s2_religiosity_effects$p.value),
  gof = c(as.numeric(summary(fit12_s2_religiosity)[9]), 
          as.numeric(summary(fit12_s2_religiosity)[10]), 
          as.integer(summary(fit12_s2_religiosity)[13]), 
          fit12_s2_religiosity_rmse),
  gof.names = c("R$^2$", "Adj. R$^2$", "Num. obs", "RMSE")
)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(fit12_s2_religiosity_effects_v2,
  custom.coef.names = 
    c("Intercept", "Control (Medium attendance)", "Control (High attendance", 
                 "Control (Low attendance)", "Fact-check (Medium attendance)", 
                 "Fact-check (High attendance)", "Fact-check (Low attendance)"),
  caption = "Effect of fact-check about pregnant 10-year-old on ratings of Americans United For Life (0-to-100 scale)",
  caption.above = TRUE, 
  float.pos = "H",
  single.row = "TRUE")
```

### Other attitudes: abortion laws and penalties

```{r, include = FALSE, message = FALSE}
#Cleaning abortion laws measure
both_waves_s2$abortion_laws <- NA
both_waves_s2$abortion_laws[
  both_waves_s2$Q1...90_w2 == "By law, abortion should never be permitted."
  ] <- 1
both_waves_s2$abortion_laws[
  both_waves_s2$Q1...90_w2 == "The law should permit abortion only in case of rape, incest or when the woman's life is in danger."
  ] <- 2
both_waves_s2$abortion_laws[
  both_waves_s2$Q1...90_w2 == "The law should permit abortion for reasons other than rape, incest, or danger to the woman's life, but only after the need has been clearly established."
  ] <- 3
both_waves_s2$abortion_laws[
  both_waves_s2$Q1...90_w2 == "By law, a woman should always be able to obtain an abortion as a matter of personal choice."
  ] <- 4
```

```{r, include = FALSE, message = FALSE}
#Cleaning abortion penalties measure
both_waves_s2$Q2_1_cleaned <- NA
both_waves_s2$Q2_1_cleaned[
  both_waves_s2$Q2_1_w2 == "Should face penalties"
  ] <- 1
both_waves_s2$Q2_1_cleaned[
  both_waves_s2$Q2_1_w2 == "Should not face penalties"
  ] <- 0

both_waves_s2$Q2_2_cleaned <- NA
both_waves_s2$Q2_2_cleaned[
  both_waves_s2$Q2_2_w2 == "Should face penalties"
  ] <- 1
both_waves_s2$Q2_2_cleaned[
  both_waves_s2$Q2_2_w2 == "Should not face penalties"
  ] <- 0

both_waves_s2$Q2_3_cleaned <- NA
both_waves_s2$Q2_3_cleaned[
  both_waves_s2$Q2_3_w2 == "Should face penalties"
  ] <- 1
both_waves_s2$Q2_3_cleaned[
  both_waves_s2$Q2_3_w2 == "Should not face penalties"
  ] <- 0

both_waves_s2$Q2_4_cleaned <- NA
both_waves_s2$Q2_4_cleaned[
  both_waves_s2$Q2_4_w2 == "Should face penalties"
  ] <- 1
both_waves_s2$Q2_4_cleaned[
  both_waves_s2$Q2_4_w2 == "Should not face penalties"
  ] <- 0

both_waves_s2$abortion_penalties <-
  both_waves_s2$Q2_1_cleaned + both_waves_s2$Q2_2_cleaned +
  both_waves_s2$Q2_3_cleaned + both_waves_s2$Q2_4_cleaned
```

```{r, include = FALSE, warning = FALSE}
#Creating new variable for whether someone was
  #assigned to misinformation, control,
  #or fact-check condition of some sort
both_waves_s2$fc_all <- NA
both_waves_s2$fc_all[
  both_waves_s2$fc1_w2 == "mis" |  
  both_waves_s2$fc2_w2 == "mis" | 
  both_waves_s2$fc3_w2 == "mis"] <- "mis"
both_waves_s2$fc_all[
  both_waves_s2$fc1_w2 == "c" |  
  both_waves_s2$fc2_w2 == "c" | 
  both_waves_s2$fc3_w2 == "c"] <- "c"
both_waves_s2$fc_all[
  both_waves_s2$fc1_w2 == "fc" |  
  both_waves_s2$fc2_w2 == "fc" | 
  both_waves_s2$fc3_w2 == "fc"] <- "fc"
```

```{r, include = FALSE, message = FALSE}
#Setting misinformation group as reference category
both_waves_s2$fc_all <- 
  as.factor(both_waves_s2$fc_all)
both_waves_s2$fc_all <- 
  relevel(both_waves_s2$fc_all, ref="mis")
```

```{r, include = FALSE, message = FALSE}
#Creating subsets for people who were asked
  #about first, second, and third factual beliefs
both_waves_s2_fc1 <-
  subset(both_waves_s2, fc1_w2 %in% c("mis", "c", "fc"))
both_waves_s2_fc2 <-
  subset(both_waves_s2, fc2_w2 %in% c("mis", "c", "fc"))
both_waves_s2_fc3 <-
  subset(both_waves_s2, fc3_w2 %in% c("mis", "c", "fc"))
```

```{r, include = FALSE, message = FALSE}
#Running models

#FC1 group
fit13_s2 <- lm_robust(abortion_laws ~ fc_all + abortion_laws_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2_fc1)
#FC2 group
fit14_s2 <- lm_robust(abortion_laws ~ fc_all + abortion_laws_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2_fc2)
#FC3 group
fit15_s2 <- lm_robust(abortion_laws ~ fc_all + abortion_laws_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2_fc3)
```



```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(list(fit13_s2, fit14_s2, fit15_s2), include.ci = FALSE,
       custom.model.names=c("FC1", "FC2", "FC3"),
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment abortion laws attitudes", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check on attitudes about abortion laws (1-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "abortion_laws_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

```{r, include = FALSE, message = FALSE}
#Running models

#FC1 group
fit16_s2 <- lm_robust(abortion_penalties ~ fc_all + abortion_penalties_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2_fc1)
#FC2 group
fit17_s2 <- lm_robust(abortion_penalties ~ fc_all + abortion_penalties_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2_fc2)
#FC3 group
fit18_s2 <- lm_robust(abortion_penalties ~ fc_all + abortion_penalties_screener + pid_cleaned +
        male + college_grad + income_100000 + age +
        relig_affiliated + monthly_attend + non_hisp_white, data = both_waves_s2_fc3)
```

```{r, echo = FALSE, results='asis'}
#Creating regression table
texreg(list(fit16_s2, fit17_s2, fit18_s2), include.ci = FALSE,
       custom.model.names=c("FC1", "FC2", "FC3"),
       custom.coef.names = c("Intercept", "Control", "Fact-check", "Pre-treatment abortion penalties attitudes", 
          "Partisanship", "Male", "College graduate", "High household income", "Age", "Religiously affiliated", "Monthly attendance",
          "Non-Hispanic White"),
       stars = c(0.05, 0.01, 0.001), 
       caption = "Effect of fact-check on attitudes about abortion penalties (0-to-4 scale)", 
       caption.above = TRUE, float.pos = "H",
       single.row = TRUE,
       omit.coef = "abortion_penalties_screener|pid_cleaned|male|college_grad|income_100000|age|relig_affiliated|monthly_attend|non_hisp_white")
```

## Setting up the H1 graph (factual beliefs)

Setting up the Study 1 .Rmd file for more details.

```{r, include = FALSE, message = FALSE}
#Creating marginal effects data frame
#Looking at effects of misinformation and fact-checks on factual beliefs
ma_fit1_s2 <- margins(fit1_s2)
ma_2_fit1_s2 <- summary(ma_fit1_s2)
ma_2_fit1_s2$var <- 1:11

ma_fit2_s2 <- margins(fit2_s2)
ma_2_fit2_s2 <- summary(ma_fit2_s2)
ma_2_fit2_s2$var <- 1:11

ma_fit3_s2 <- margins(fit3_s2)
ma_2_fit3_s2 <- summary(ma_fit3_s2)
ma_2_fit3_s2$var <- 1:11

ma_combined_s2 <- rbind(ma_2_fit1_s2[5,], ma_2_fit2_s2[5,], ma_2_fit3_s2[5,])
ma_combined_s2$var <- 1:3

ma_combined_s2_2 <- rbind(ma_2_fit1_s2[4,], ma_2_fit2_s2[4,], ma_2_fit3_s2[4,])
ma_combined_s2_2$var <- 1:3

ma_combined_s2_2$AME <- -ma_combined_s2_2$AME
ma_combined_s2_2$lower <- -ma_combined_s2_2$lower
ma_combined_s2_2$upper <- -ma_combined_s2_2$upper
colnames(ma_combined_s2_2) <- c("factor", "AME", "SE", "z", "p", "upper", "lower", "var")

ma_combined_s2$factor <- NULL
ma_combined_s2_2$factor <- NULL
ma_combined_s2$effect <- "Fact-check"
ma_combined_s2_2$effect <- "Misinformation"
ma_combined_s2_2 <-
  ma_combined_s2_2 %>%
  select(AME, SE, z, p, lower, upper, var, effect)

ma_combined_s2_v1 <-
  rbind(ma_combined_s2, ma_combined_s2_2)
colnames(ma_combined_s2_v1) <-
  c("AME", "SE", "z", "p", "lower", "upper", "var", "Effect")
```

```{r, include = FALSE, message = FALSE}
#Saving marginal effects (factual beliefs) data frame
save(ma_combined_s2_v1, file = "ma_combined_attitudes_s2_v1.RData")
```

## Setting up H2 graph (attitudinal beliefs)

See the Study 1 .Rmd file for more details.

```{r, include = FALSE, message = FALSE}
#Creating marginal effects data frame
#Looking at effects of fact-checks on attitudinal beliefs
ma_fit4_s2 <- margins(fit4_s2)
ma_2_fit4_s2 <- summary(ma_fit4_s2)
ma_2_fit4_s2$var <- 1:11

ma_fit5_s2 <- margins(fit5_s2)
ma_2_fit5_s2 <- summary(ma_fit5_s2)
ma_2_fit5_s2$var <- 1:11

ma_fit6_s2 <- margins(fit6_s2)
ma_2_fit6_s2 <- summary(ma_fit6_s2)
ma_2_fit6_s2$var <- 1:11

ma_combined_3_s2 <- rbind(ma_2_fit4_s2[5,], ma_2_fit5_s2[4,], ma_2_fit6_s2[5,])
ma_combined_3_s2$var <- 1:3

ma_combined_4_s2 <- rbind(ma_2_fit4_s2[4,], ma_2_fit5_s2[3,], ma_2_fit6_s2[4,])
ma_combined_4_s2$var <- 1:3

ma_combined_4_s2$AME <- -ma_combined_4_s2$AME
ma_combined_4_s2$lower <- -ma_combined_4_s2$lower
ma_combined_4_s2$upper <- -ma_combined_4_s2$upper
colnames(ma_combined_4_s2) <- c("factor", "AME", "SE", "z", "p", "upper", "lower", "var")

ma_combined_3_s2$factor <- NULL
ma_combined_4_s2$factor <- NULL
ma_combined_3_s2$effect <- "Fact-check"
ma_combined_4_s2$effect <- "Misinformation"
ma_combined_4_s2 <-
  ma_combined_4_s2 %>%
  select(AME, SE, z, p, lower, upper, var, effect)

ma_combined_s2_v2 <-
  rbind(ma_combined_3_s2, ma_combined_4_s2)
colnames(ma_combined_s2_v2) <-
  c("AME", "SE", "z", "p", "lower", "upper", "var", "Effect")
```

```{r, include = FALSE, message = FALSE}
#Saving marginal effects (attitudinal beliefs) data frame
save(ma_combined_s2_v2, file = "ma_combined_attitudes_s2_v2.RData")
```

## Balance tables

```{r, include = FALSE, message = FALSE}
#Setting up balance frame for respondents who received FC1
#Selecting just some variables and renaming some of them
#Recoding the `Abortion pills FC` variable
abortion_s2_fc1_v2 <- both_waves_s2_fc1 %>%
  select(fc1_w2, age, male, non_hisp_white, college_grad, income_100000, 
         pid_cleaned)
colnames(abortion_s2_fc1_v2) <-
  c("Abortion pills FC", "Age", "Share who are male", 
    "Share who are non-Hispanic White", 
    "Share who are college graduates", 
    "Share who have household incomes of $100,000+",
    "Partisanship (7-point scale)")
abortion_s2_fc1_v2$`Abortion pills FC` <-
  as.character(abortion_s2_fc1_v2$`Abortion pills FC`)
abortion_s2_fc1_v2$`Abortion pills FC`[
abortion_s2_fc1_v2$`Abortion pills FC` == "c"
  ] <- "Control"
abortion_s2_fc1_v2$`Abortion pills FC`[
abortion_s2_fc1_v2$`Abortion pills FC` == "fc"
  ] <- "Fact-check"
abortion_s2_fc1_v2$`Abortion pills FC`[
  abortion_s2_fc1_v2$`Abortion pills FC` == "mis"
  ] <- "Misinformation"
```

```{r, include = FALSE, message = FALSE}
#Setting up balance frame for respondents who received FC2
#Selecting just some variables and renaming some of them
#Recoding the `Contraception FC` variable
abortion_s2_fc2_v2 <- both_waves_s2_fc2 %>%
  select(fc2_w2, age, male, non_hisp_white, college_grad, income_100000, 
         pid_cleaned)
colnames(abortion_s2_fc2_v2) <-
  c("Contraception FC", "Age", "Share who are male", 
    "Share who are non-Hispanic White", 
    "Share who are college graduates", 
    "Share who have household incomes of $100,000+",
    "Partisanship (7-point scale)")
abortion_s2_fc2_v2$`Contraception FC` <-
  as.character(abortion_s2_fc2_v2$`Contraception FC`)
abortion_s2_fc2_v2$`Contraception FC`[
abortion_s2_fc2_v2$`Contraception FC` == "c"
  ] <- "Control"
abortion_s2_fc2_v2$`Contraception FC`[
abortion_s2_fc2_v2$`Contraception FC` == "fc"
  ] <- "Fact-check"
abortion_s2_fc2_v2$`Contraception FC`[
  abortion_s2_fc2_v2$`Contraception FC` == "mis"
  ] <- "Misinformation"
```

```{r, include = FALSE, message = FALSE}
#Setting up balance frame for respondents who received FC3
#Selecting just some variables and renaming some of them
#Recoding the `10-year-old FC` variable
abortion_s2_fc3_v2 <- both_waves_s2_fc3 %>%
  select(fc3_w2, age, male, non_hisp_white, college_grad, income_100000, 
         pid_cleaned)
colnames(abortion_s2_fc3_v2) <-
  c("10-year-old FC", "Age", "Share who are male", 
    "Share who are non-Hispanic White", 
    "Share who are college graduates", 
    "Share who have household incomes of $100,000+",
    "Partisanship (7-point scale)")
abortion_s2_fc3_v2$`10-year-old FC` <-
  as.character(abortion_s2_fc3_v2$`10-year-old FC`)
abortion_s2_fc3_v2$`10-year-old FC`[
abortion_s2_fc3_v2$`10-year-old FC` == "c"
  ] <- "Control"
abortion_s2_fc3_v2$`10-year-old FC`[
abortion_s2_fc3_v2$`10-year-old FC` == "fc"
  ] <- "Fact-check"
abortion_s2_fc3_v2$`10-year-old FC`[
  abortion_s2_fc3_v2$`10-year-old FC` == "mis"
  ] <- "Misinformation"
```

First fact-check (abortion pills):

```{r, include = FALSE, message = FALSE}
#Creating first balance table
abortion_s2_fc1_v3 <- balance_table(abortion_s2_fc1_v2, "Abortion pills FC")
colnames(abortion_s2_fc1_v3) <- c("Variable", "Control", "Fact-check", "Misinfo", "p-value (c vs fc)", "p-value (c vs mis)")
```

```{r, echo = FALSE, results='asis'}
#Printing out results of first balance table
print(xtable(abortion_s2_fc1_v3), size = "tiny")
```

Second fact-check (contraception):

```{r, include = FALSE, message = FALSE}
#Creating second balance table
abortion_s2_fc2_v3 <- balance_table(abortion_s2_fc2_v2, "Contraception FC")
colnames(abortion_s2_fc2_v3) <- c("Variable", "Control", "Fact-check", "Misinfo", "p-value (c vs fc)", "p-value (c vs mis)")
```


```{r, echo = FALSE, results='asis'}
#Printing out results from second balance table
print(xtable(abortion_s2_fc2_v3), size = "tiny")
```

Third fact-check (10-year-old):

```{r, include = FALSE, message = FALSE}
#Creating third balance table
abortion_s2_fc3_v3 <- balance_table(abortion_s2_fc3_v2, "10-year-old FC")
colnames(abortion_s2_fc3_v3) <- c("Variable", "Control", "Fact-check", "Misinfo", "p-value (c vs fc)", "p-value (c vs mis)")
```

```{r, echo = FALSE, results='asis'}
#Printing out results from third balance table
print(xtable(abortion_s2_fc3_v3), size = "tiny")
```


```{r, include = FALSE, message = FALSE}
# Setting up data for pooled data/heterogeneous effects analysis
pooled_analysis_study2 <-
  both_waves_s2 %>%
  dplyr::select(therm_1_fc1, fc1_w2,
                therm_1_fc2, fc2_w2,
                therm_1_fc3, fc3_w2,
                pid_cleaned, male, college_grad, age,
                relig_affiliated, attend_cleaned, non_hisp_white)
pooled_analysis_study2$study <- "study2"


#Saving marginal effects (attitudinal beliefs) data frame
save(pooled_analysis_study2, file = "pooled_analysis_study2.RData")
```

